﻿using TallyBook.DAL.Mode;
using TallyBook.DAL.Repository.Imp;

namespace TallyBook.BLL.Service.Imp
{
    public class UserService : IUserService
    {
        private readonly UserRepository _repository;

        public UserService(UserRepository userRepository)
        {
            _repository = userRepository;
        }

        public bool Login(string userName, string pwd)
        {
            var user = new User {Name = userName, Password = pwd};
            return _repository.Exits(user);
        }
    }
}